<template>
	<div id="friend-merchant-manage" class="w-h-100 pos-r flex-1 apply-container" style="box-sizing: border-box; overflow: hidden">
		<div class="w-h-100 ver-flex pos-a" style="box-sizing: border-box; padding: 6px">
			<div class="search-s page-public-s" style="box-sizing: border-box">
				<el-card shadow="never" :body-style="{ paddingBottom: '0' }">
					<el-form class="box-f" ref="queryForm" :inline="true">
						<!-- <el-form-item label="文档名称：">
							<el-input v-model="transferVal" placeholder="请输入文档名称" />
						</el-form-item> -->
						<el-form-item>
							<el-button @click="addNodeClick" icon="ele-Plus" type="primary"> 新增 </el-button>
							<el-button @click="handleExport" icon="ele-Download"> 导出数据 </el-button>
						</el-form-item>
					</el-form>
				</el-card>
			</div>

			<div style="box-sizing: border-box" class="flex-1 pos-r">
				<div class="pos-a w-h-100" style="box-sizing: border-box">
					<el-card class="box-card w-h-100" shadow="never" style="margin-top: 16px">
						<div style="" class="w-h-100 ver-flex">
							<div class="flex-1 pos-r">
								<div class="pos-a w-h-100">
									<el-table :data="list" ref="excelRef" class="w-h-100" style="width: 100%" border v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.5)">
										<el-table-column type="index" label="序号" width="55" :show-overflow-tooltip="true" align="center" :index="indexMethod" />
										<el-table-column min-width="120" :show-overflow-tooltip="true" label="文档名称" align="center">
											<el-table-column min-width="120" :show-overflow-tooltip="true" align="center">
												<template #header>
													<SearchModel typeId="documentName" typeVal="input" @searchHandel="searchHandel" :basicsInfo="basicsInfo" />
												</template>
												<template #default="{ row }">
													{{ row.documentName }}
												</template>
											</el-table-column>
										</el-table-column>
										<el-table-column min-width="120" :show-overflow-tooltip="true" prop="value" label="文档类型名" align="center" />
										<el-table-column min-width="120" :show-overflow-tooltip="true" label="上传人" align="center">
											<template #default="scope">
												<span v-if="scope.row.uploadUser">{{ scope.row.uploadUser }}</span>
												<span v-else> - </span>
											</template>
										</el-table-column>
										<el-table-column min-width="120" :show-overflow-tooltip="true" prop="d_UploadTime" label="上传日期" :formatter="formatDate" align="center" />
										<el-table-column min-width="120" :show-overflow-tooltip="true" prop="d_ExpireTIme" label="失效日期" :formatter="formatDate" align="center" />
										<el-table-column min-width="180" label="操作" align="center" fixed="right">
											<el-table-column min-width="180" align="center" fixed="right">
												<template #header>
													<el-button @click="searchClick" icon="ele-Search" type="primary" text> 查询 </el-button>
													<el-button @click="resetClick" icon="ele-Refresh" text> 重置 </el-button>
												</template>
												<template #default="scope">
													<div class="operate-s">
														<el-button @click="detailHandle(scope.row)" class="icon-e" icon="ele-View" size="small" text type="success"> 详情 </el-button>
														<el-button @click="nodeClick(scope.row)" class="icon-e" icon="ele-Edit" size="small" text type="primary"> 编辑 </el-button>
														<el-button @click="messageNotif(scope.row)" class="icon-e" icon="ele-ChatRound" size="small" text type="primary" v-if="urlName == 'safetyPlan'"> 消息通知 </el-button>

														<el-button size="small" @click="documentClick(scope.row)" text type="primary"> 附件管理 </el-button>
														<el-button @click="deleteHandle(scope.row.n_Id, getData)" class="icon-e" icon="ele-Delete" size="small" text type="danger"> 删除 </el-button>
													</div>
												</template>
											</el-table-column>
										</el-table-column>
									</el-table>
								</div>
							</div>
							<div style="height: 30px; margin-top: 20px" class="hr-flex-start">
								<el-pagination
									v-model:currentPage="pageNo"
									v-model:page-size="pageSize"
									:total="totalRows"
									:page-sizes="[10, 20, 50, 100]"
									small
									background
									@size-change="handleSizeChange"
									@current-change="handleCurrentChange"
									layout="total, sizes, prev, pager, next, jumper"
									class="w-h-100"
								/>
							</div>
						</div>
					</el-card>
				</div>
			</div>
		</div>
		<!-- 新增and编辑 -->
		<el-dialog draggable :close-on-click-modal="false" :close-on-press-escape="false" v-model="showDialogVisible" :title="saveId ? '编辑' : '新增'" width="50%" @close="cancelUseClick">
			<el-form label-width="80px" ref="ruleFormRef" :model="ruleForm" size="default" :rules="rules">
				<el-divider content-position="left"> 基本信息 </el-divider>
				<el-row :gutter="35">
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item prop="documentName" label="文档名">
							<el-input v-model="ruleForm.documentName" placeholder="请选择文档名" clearable />
						</el-form-item>
					</el-col>
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item label="上传人">
							<el-input v-model="ruleForm.uploadUser" placeholder="请选择上传人" clearable />
						</el-form-item>
					</el-col>
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item prop="d_UploadTime" label="上传日期">
							<el-date-picker v-model="ruleForm.d_UploadTime" type="date" placeholder="请选择上传日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD" style="width: 100%" />
						</el-form-item>
					</el-col>
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item label="失效日期">
							<el-date-picker v-model="ruleForm.d_ExpireTIme" type="date" placeholder="请选择失效时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" style="width: 100%" />
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
			<template #footer>
				<span class="dialog-footer">
					<el-button @click="cancelUseClick">取消</el-button>
					<el-button type="primary" @click="controlUseClick(ruleFormRef, getData)">确定</el-button>
				</span>
			</template>
		</el-dialog>
		<!-- 查看详情 -->
		<el-dialog draggable :close-on-click-modal="false" :close-on-press-escape="false" v-model="showDetailDialogVisible" title="详情" width="50%" @close="cancelDetailClick">
			<el-divider content-position="left"> 基本信息 </el-divider>
			<el-descriptions class="margin-top" :column="2" border>
				<el-descriptions-item>
					<template #label> 文档名称 </template>
					{{ tableData.documentName }}
				</el-descriptions-item>
				<el-descriptions-item>
					<template #label> 上传人 </template>
					{{ tableData.uploadUser }}
				</el-descriptions-item>
				<el-descriptions-item>
					<template #label> 上传日期 </template>
					{{ tableData.d_UploadTime }}
				</el-descriptions-item>
				<el-descriptions-item>
					<template #label> 作废日期 </template>
					{{ tableData.d_ExpireTIme }}
				</el-descriptions-item>
			</el-descriptions>
			<el-divider content-position="left"> 附件信息 </el-divider>
			<el-table :data="tableData.v_FilePath" style="width: 100%" border>
				<el-table-column align="center" type="index" label="序号" min-width="50" />
				<!-- <el-table-column align="center" prop="path" label="文件路径" min-width="120" /> -->
				<el-table-column align="center" prop="createdUserName" label="创建人" min-width="100" />
				<el-table-column align="center" prop="createdTime" label="创建时间" min-width="100" />
				<el-table-column align="center" prop="path" label="文件路径" min-width="120">
					<template #default="scope">
						<el-button @click="viewClick(scope.row)" class="icon-e" text type="success">预览</el-button>
						<el-button @click="downClick(scope.row)" class="icon-e" text type="warning">下载</el-button>
					</template>
				</el-table-column>
			</el-table>
		</el-dialog>
		<!-- 文件上传下载 -->
		<uploadFile isAccept="" :fileInfo="fileInfo" :isUseDialog="fileDialog" @cancelFileClick="cancelFileClick" @controlFileClick="controlFileClick" @updateData="getData" />
		<!-- 消息通知 -->
		<el-dialog draggable :close-on-click-modal="false" :close-on-press-escape="false" v-model="showDialogVisible1" title="消息通知" width="50%" @close="cancelUseClick1">
			<el-form label-width="60px" ref="ruleFormRef1" :model="ruleForm" size="default" :rules="rules1">
				<el-divider content-position="left"> 基本信息 </el-divider>
				<el-row :gutter="35">
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-radio-group v-model="radio1" style="width: 100%;" @change="radioChange">
							<el-radio :value="1" :label="1">部门</el-radio>
							<el-radio :value="2" :label="2">人员</el-radio>
						</el-radio-group>
					</el-col>
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20" v-if="radio1 == 1">
						<el-form-item label="部门">
							<el-tree-select placeholder="请选择部门" v-model="selectDept" @check="selectDeptChange" :data="messageNotifData" multiple :render-after-expand="false" show-checkbox style="width: 100%" />
						</el-form-item>
					</el-col>
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20" v-if="radio1 == 2">
						<el-form-item label="人员">
							<el-select v-model="ruleForm1.sendUsers" multiple placeholder="请选择人员">
								<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value" />
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
			<template #footer>
				<span class="dialog-footer">
					<el-button @click="cancelUseClick1">取消</el-button>
					<el-button type="primary" @click="controlUseClick1(ruleFormRef1, getData)">确定</el-button>
				</span>
			</template>
		</el-dialog>
	</div>
</template>
<script lang="ts">
import { defineComponent, ref, reactive, onMounted, onUnmounted } from 'vue';
import getTableData from './getTableData';
import uploadFile from '/@/views/sms/component/reviseUploadFile.vue';
import {
	getOrgResponsibilityApi,
	deleteOrgResponsibilityApi,
	updateOrgResponsibilityApi,
	addOrgResponsibilityApi,
	getOrgResponsibilityDetailApi,
	sendSafetyPlanMessageApi,
	getDeptEmployeeListApi,
} from '/@/api/sms/HazardousChemicalsInterface';
import { sysDictDataList, sysOrgTree, sysUserSelector } from '/@/api/centerControl/pubilc';
import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
import SearchModel from '/@/views/sms/component/search-model.vue';
import { sysFileInfoPreviewBase64 } from '/@/api/centerControl/pubilc';
import { exportToExcel } from '/@/utils/exportToExcel';
export default defineComponent({
	name: 'friend-merchant-manage',
	components: {
		SearchModel,
		uploadFile,
	},
	setup() {
		/***** 变量 *****/
		const transferVal = ref(); // 需要查询的值
		const showDialogVisible = ref(false);
		let searchObj: any = reactive({
			// DocumentType: 0
		});

		const ruleForm = reactive({
			documentName: '',
			documentType: '',
			d_ExpireTIme: '',
			uploadUser: '',
			d_UploadTime: '',
		});
		/***** searchClick 查询按钮 *****/
		const searchClick = () => {
			// searchObj.DocumentName = transferVal.value;
			let newObj = Object.keys(searInfo.value);
			if (newObj.length !== 0) {
				newObj.map((i: any) => {
					searchObj[i] = searInfo.value[i];
				});
			}
		};
		const resetClick = () => {
			searInfo.value = {};
			searchObj['DocumentName'] = '';
			// let newObj = Object.keys(searchObj);
			// console.log(newObj);

			// if (newObj.length !== 0) {
			// 	newObj.map((i: any) => {
			// 		searchObj[i] = '';
			// 		console.log(searchObj[i]);
			// 	});
			// }
			initInfoFun();
		};
		/***** addNodeClick 新增 *****/
		const addNodeClick = async () => {
			showDialogVisible.value = true;
		};

		/***** nodeClick 编辑 *****/
		const saveId = ref();
		const nodeClick = async (row: any) => {
			console.log(row);
			if (row.n_Id) {
				saveId.value = row.n_Id;
				ruleForm.documentName = row.documentName;
				ruleForm.d_ExpireTIme = row.d_ExpireTIme;
				ruleForm.uploadUser = row.uploadUser;
				ruleForm.d_UploadTime = row.d_UploadTime;
			}
			showDialogVisible.value = true;
		};

		/*** deleteHandle 删除数据事件 */
		const deleteHandle = async (val: String | Number, updateFun: Function) => {
			ElMessageBox.confirm('请确定删除此条数据', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning',
			})
				.then(async () => {
					let param = { id: val };
					try {
						let res: any = await deleteOrgResponsibilityApi(param);
						if (res.success) {
							updateFun();
						}
					} catch (err) {
						return;
					}
				})
				.catch(() => {
					ElMessage({
						type: 'info',
						message: '删除失败',
					});
				});
		};

		/*** detailHandle 查看详情事件 */
		const showDetailDialogVisible = ref(false);
		const tableData = ref();
		const detailHandle = async (item: any) => {
			const res = await getOrgResponsibilityDetailApi({ Id: item.n_Id });
			console.log(res);
			tableData.value = res.data;
			showDetailDialogVisible.value = true;
		};
		const cancelDetailClick = () => {
			showDialogVisible.value = false;
		};

		/*** cancelUseClick  弹窗取消事件 */
		const cancelUseClick = () => {
			showDialogVisible.value = false;
			saveId.value = '';
			ruleForm.documentName = '';
			ruleForm.documentType = '';
			ruleForm.d_ExpireTIme = '';
			ruleForm.uploadUser = '';
			ruleForm.d_UploadTime = '';
			ruleFormRef.value!.clearValidate();
		};

		/*** controlUseClick  弹窗提交事件 */
		const controlUseClick = async (formEl: FormInstance | undefined, updateFun: Function) => {
			if (!formEl) return;
			await formEl.validate((valid, fields) => {
				if (valid) {
					ruleForm.documentType = documentItem.value[0]?.id;

					let data1 = new Date(ruleForm.d_UploadTime);
					let data2 = new Date(ruleForm.d_ExpireTIme);

					if (data1 > data2) {
						ElMessage.warning('上传时间不能大于失效时间');
						return;
					}

					if (saveId.value) {
						updateOrgResponsibilityApi({ ...ruleForm, n_Id: saveId.value });
					} else {
						addOrgResponsibilityApi(ruleForm);
					}
					setTimeout(() => {
						updateFun();
						cancelUseClick();
					}, 100);
				} else {
					console.log('error submit!', fields);
				}
			});
		};

		/*** ruleFormRef  表单校验 */
		const ruleFormRef = ref();
		const rules = reactive({
			documentName: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
			d_UploadTime: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
			d_ExpireTIme: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
		});

		// 消息通知
		const radio1 = ref(1);
		const messageNotif = (row: any) => {
			showDialogVisible1.value = true;
			ruleForm1.n_Id = row.n_Id;
			ruleForm1.documentType = row.value;
		};
		const showDialogVisible1 = ref(false);
		const ruleForm1: any = reactive({
			sendUsers: '',
			documentType: '',
			n_Id: '',
		});
		const rules1 = reactive({
			sendUsers: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
		});
		let OrgIds: any = [];
		const ruleFormRef1 = ref();
		const selectDept = ref();
		const cancelUseClick1 = () => {
			showDialogVisible1.value = false;
			radio1.value = 1;
			ruleForm1.n_Id = '';
			ruleForm1.documentType = '';
			ruleForm1.sendUsers = '';
			selectDept.value = '';
			OrgIds = [];
		};
		const radioChange = () => {
			selectDept.value = '';
			OrgIds = [];
			ruleForm1.sendUsers = '';
		};
		const controlUseClick1 = async (formEl: FormInstance | undefined, updateFun: Function) => {
			if (!formEl) return;
			await formEl.validate((valid, fields) => {
				if (valid) {
					sendSafetyPlanMessageApi(ruleForm1).then((res) => {
						cancelUseClick1();
						updateFun();
					});
				} else {
					console.log('error submit!', fields);
				}
			});
		};
		const selectDeptChange = async (item) => {
			item.children &&
				item.children.forEach((item1) => {
					OrgIds.push(item1.value);
				});
			OrgIds.push(item.value);
			console.log('orgIds', OrgIds);
			if (!OrgIds.length) return;
			const res = await getDeptEmployeeListApi({ OrgIds: OrgIds }); //OrgIds
			// console.log(res);
			ruleForm1.sendUsers = res.data.map((item) => {
				return item.id;
			});
			console.log(ruleForm1.sendUsers);
		};

		// 附件上传
		/*** 附件管理 */
		const fileInfo = ref();
		const fileDialog = ref(false);
		const cancelFileClick = () => {
			fileDialog.value = false;
		};
		const controlFileClick = () => {
			fileDialog.value = false;
		};
		const documentClick = (val: any) => {
			console.log(val, 'val');
			val.sourceType = 10;
			val.sourceId = val.n_Id;
			val.titleCon = '附件上传';
			fileInfo.value = JSON.stringify(val);
			fileDialog.value = true;
		};

		const documentItem = ref([]);
		const messageNotifData = ref([]);
		const options1 = ref([]);
		const urlName = window.location.href.split('/').at(-1);
		onMounted(async () => {
			const res = await sysDictDataList({ TypeCode: 'Institutional_Responsibility_Management' });
			const url = window.location.href.split('/').at(-1);
			const item = await res.data.filter((item: any) => {
				if (url === item.code) {
					return item;
				}
			});
			documentItem.value = item;
			console.log(item);
			searchObj.DocumentType = item[0].id;

			await initInfoFun();
			//sysUserSelector 获取用户下拉框
			//getDeptEmployeeListApi  OrgIds[0]
			//sysOrgTree 查询部门树
			if (url == 'safetyPlan') {
				const res6 = await sysUserSelector({});
				options1.value = res6.data.map((item: any) => {
					return {
						label: item.name,
						value: item.id,
					};
				});
				const res7 = await sysOrgTree({});
				messageNotifData.value = res7.data.map((item: any) => {
					return {
						label: item.title,
						value: item.id,
						children: item.children.map((item2: any) => {
							return {
								label: item2.title,
								value: item2.id,
							};
						}),
					};
				});
			}
		});

		/*** 初始化数据 */
		const basicsInfo: any = ref([]);
		const initInfoFun = () => {
			basicsInfo.value = [
				{
					typeId: 'documentName', // 类型(不能为空，且唯一，与组件中typeId值对应) --- 必填
					typeNam: '', // 输入类型(number,text等) --- 选填
					searchVal: 'DocumentName', // 查询字段 --- 必填
					defaultVal: '', // 字段默认值 --- 选填
					placeholder: '文档名称', // placeholder数据
					defaultProp: '', // 下拉框中使用，除下拉框外其它情况为空 --- 选填
					eventType: '', // 事件类型（如burl/change等） --- 选填
					defaultEvent: '', // 事件名称 --- 选填
				},
			];
		};

		const searInfo: any = ref();
		const searchHandel = (val: any) => {
			searInfo.value = val;
		};

		/*** 截取日期格式方法 */
		const formatDate = (row: any, column: any) => {
			// 获取单元格数据
			let data = row[column.property];
			if (data == null) {
				return '-';
			}
			if (data === '1900-01-01 00:00:00') {
				return '-';
			}
			let dt = new Date(data);
			let month = dt.getMonth() + 1 < 10 ? '0' + (dt.getMonth() + 1) : dt.getMonth() + 1;
			let date = dt.getDate() < 10 ? '0' + dt.getDate() : dt.getDate();
			return dt.getFullYear() + '-' + month + '-' + date;
		};

		/*** viewClick 文件预览 */
		const baseUrl = import.meta.env.VITE_API_URL;
		const viewClick = async (val: any) => {
			let viewUrl = baseUrl + '/' + val.path;
			window.open(viewUrl);
		};
		/*** downClick 下载文件 */
		/*** getFileFun 获取文件数据 */
		const getFileFun = async (val: Number) => {
			let param: any = {};
			param.id = val;
			let res: any = await sysFileInfoPreviewBase64(param);
			console.log(res, 'res');
			if (res.success) {
				return res.data;
			}
		};

		// 将Base64编码数据转换为Blob对象的辅助函数
		const base64ToBlob = (base64Data: any) => {
			var byteString = atob(base64Data.split(',')[1]); // 提取Base64编码的数据部分
			var mimeString = base64Data.split(':')[1].split(';')[0]; // 提取MIME类型
			var ab = new ArrayBuffer(byteString.length);
			var ia = new Uint8Array(ab);
			for (var i = 0; i < byteString.length; i++) {
				ia[i] = byteString.charCodeAt(i);
			}
			return new Blob([ab], { type: mimeString });
		};

		const downClick = async (val: any) => {
			let getFile = getFileFun(val.id);
			console.log(getFile);
			// 等待getFileFun完成
			await getFile;
			if (getFile && getFile.then) {
				getFile.then((res) => {
					let base64Data = res;
					let blob = base64ToBlob(base64Data);

					// 创建可下载的链接
					let url = URL.createObjectURL(blob);
					let link = document.createElement('a');
					link.href = url;
					link.download = val.fileOriginName; // 指定下载的文件名

					// 将链接添加到DOM中
					document.body.appendChild(link);

					// 触发点击事件开始下载
					link.click();

					// 释放临时URL
					URL.revokeObjectURL(url);
				});
			}
		};

		/*** ================================= 导出数据函数操作 ================================= */

		const excelRef: any = ref(null);
		const handleExport = () => {
			if (excelRef.value) {
				if (excelRef.value.data.length !== 0) {
					let tableExcel: any = [];
					let tableArr = excelRef.value.data;
					tableArr.map((item: any) => {
						let tableObj: any = {};
						tableObj['文档名称'] = item.documentName ? item.documentName : '-';
						tableObj['文档类型名'] = item.value ? item.value : '-';
						tableObj['上传人'] = item.uploadUser ? item.uploadUser : '-';
						tableObj['上传日期'] = item.d_UploadTime ? item.d_UploadTime : '-';
						tableObj['失效日期'] = item.d_ExpireTIme ? item.d_ExpireTIme : '-';
						tableExcel.push(tableObj);
					});
					exportToExcel(tableExcel, documentItem.value[0].remark + '.xlsx');
				} else {
					ElMessage({
						type: 'error',
						message: '暂无数据导出',
					});
				}
			}
		};

		return {
			...getTableData(getOrgResponsibilityApi, {}, searchObj),
			searchClick,
			resetClick,
			transferVal,
			showDialogVisible,
			deleteHandle,
			ruleForm,
			nodeClick,
			saveId,
			cancelUseClick,
			controlUseClick,
			rules,
			ruleFormRef,
			addNodeClick,
			cancelFileClick,
			controlFileClick,
			documentClick,
			fileDialog,
			fileInfo,
			detailHandle,
			cancelDetailClick,
			showDetailDialogVisible,
			tableData,
			searchHandel,
			basicsInfo,
			formatDate,
			viewClick,
			downClick,
			handleExport,
			excelRef,
			messageNotif,
			controlUseClick1,
			cancelUseClick1,
			rules1,
			showDialogVisible1,
			radio1,
			ruleForm1,
			messageNotifData,
			options1,
			ruleFormRef1,
			selectDept,
			selectDeptChange,
			radioChange,
			urlName,
		};
	},
});
</script>
<style lang="scss">
@import '../style/public.scss';
</style>
<style scoped lang="scss">
#friend-merchant-manage {
	.box-f {
		:deep(.el-form-item__label) {
			padding: 0;
		}
	}

	:deep(.el-card__body) {
		height: 100%;
	}

	:deep(.el-card) {
		border: none !important;
	}

	.upload-demo {
		margin-left: 12px;
		margin-top: 2px;
	}

	ul {
		list-style: none;

		li {
			cursor: pointer;

			&:hover {
				color: red;
			}
		}
	}

	.icon-e {
		:deep(.el-icon) {
			margin-right: 0px !important;
		}
	}
}
</style>
